package com.hmall.order.config;

import com.hmall.order.interceptors.UserInterceptors;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author www
 * @Description 拦截器启动器
 * @Date 2023/4/11 11:28
 * @Version 1.0
 */
@Configuration
public class MvcConfig implements WebMvcConfigurer {
    /**
     * 添加自定义拦截器
     * @param registry
     */
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new UserInterceptors());
    }

}
